Many providers of communication services employ one or more communication servers, such as remote access servers, access routers, and voice over IP gateways. The communication servers may act as modems, fax handlers, voice over Internet Protocol (VoIP) servers and/or may provide any other communication services for a plurality of channels (referred to also as connections).
In these communication servers, the data of each channel is accumulated by an input driver, which provides, at predetermined periods, blocks of data to a digital signal processor (DSP), for processing. A predetermined time after the data blocks are provided by the input driver, an output driver retrieves the processed data. Therefore, the signal processor must handle the data of each channel between the time the data is provided by the input driver and the time the data is retrieved by the output driver. The time within which the processing must be performed is referred to as the cycle time of the channel.
In some cases, the processor may not complete the handling of one or more channels during their cycles. In such cases, old data may remain in the output buffer at the beginning of the next cycle. Generally, there is no mechanism that prevents the output driver from retrieving the old data, except the timing of the processor and the output driver. That is, if the processor requires time beyond the end of a cycle in order to finish the handling of one or more channels the output driver is not delayed but takes the data from the output buffer as usual, including old data. A state in which data of a channel is not handled during one of its cycles is referred to as a starvation state. A channel which reaches a starvation state suffers from a degradation of service and may be disconnected.
Different connections have different cycle times. For example, the ITU standard G723.1 connection requires handling of its data with a cycle of 30 milliseconds while the ITU standard G729A connection requires handling of its data with a 10 millisecond cycle. Some connections, e.g., modem and fax connections, may operate over a large range of data rates and cycle times.
Some communication servers utilize a processor, which operates as a multi-channel server serving a plurality of channels. Such a multi-channel server generally includes a scheduler that determines which channel is handled by the processor at any specific time. If an operating system that performs preemption is used, the scheduling of the processor to handle data from connections with different cycles may be less strict as the processor may interrupt the processing of data from one channel to handle data from another channel. Preemption, however, may require large percentages of the resources of the processor and therefore is wasteful.
PCT Publication No. WO 01/60008, titled “Scheduling in a Remote Access Server”, the disclosure of which is incorporated herein by reference, describes methods of scheduling a processor, which does not perform preemption, to handle channels having different cycle rates. In one embodiment, a scheduler determines a deadline for each channel by which the channel must receive a processing session. A channel having the closest deadline is scheduled for handling. Various methods are suggested for use, when a plurality of channels have same deadlines. In one option, a channel with a higher quality of service rating is handled first. In another option, an arbitrary order is used. In still another option, the order in a current cycle is determined based on the order in previous handling cycles.
An additional scheduler for communication systems is described in U.S. Pat. No. 6,385,638 to Baker-Harvey, the disclosure of which is incorporated herein by reference. An industrial controller is described in U.S. Pat. No. 5,099,449 to Dombrosky et al., the disclosure of which is incorporated herein by reference.